package com.pdg.mcplugin.recyclotron;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.bukkit.inventory.Recipe;

import com.pdg.mcplugin.common.baseclasses.PluginClientBase;

public class RecipeMaker extends PluginClientBase<Recyclotron>{
	
	private Map<String,Recipes> table = new HashMap<String,Recipes>();

	public RecipeMaker(Recyclotron thePlugin) {
		super(thePlugin);
	}

	public void makeRecipes() {
		for(Recipes theRecipe : Recipes.values()){
			table.put(theRecipe.getIngredientName(),theRecipe);
			addRecipes(theRecipe.getRecipes());
		}
	}

	private void addRecipes(List<Recipe> theRecipes) {
		for(Recipe theRecipe:theRecipes){
			getPlugin().getServer().addRecipe(theRecipe);
		}
	}
}
